import request from '@/config/axios'

// 仪器协议转换记录管理 VO
export interface DeviceProtocolConversionRecordVO {
  id: number // 主键
  wellCode: string // 井编号
  deviceCode: string // 仪器编号
  dataProtocolAfter: string // 转换后协议
  dataParamsAfter: string // 转换后数据记录
  remark: string // 备注
}

// 仪器协议转换记录管理 API
export const DeviceProtocolConversionRecordApi = {
  // 查询仪器协议转换记录管理分页
  getDeviceProtocolConversionRecordPage: async (params: any) => {
    return await request.get({ url: `/base/device-protocol-conversion-record/page`, params })
  },

  // 查询仪器协议转换记录管理详情
  getDeviceProtocolConversionRecord: async (id: number) => {
    return await request.get({ url: `/base/device-protocol-conversion-record/get?id=` + id })
  },

  // 新增仪器协议转换记录管理
  createDeviceProtocolConversionRecord: async (data: DeviceProtocolConversionRecordVO) => {
    return await request.post({ url: `/base/device-protocol-conversion-record/create`, data })
  },

  // 修改仪器协议转换记录管理
  updateDeviceProtocolConversionRecord: async (data: DeviceProtocolConversionRecordVO) => {
    return await request.put({ url: `/base/device-protocol-conversion-record/update`, data })
  },

  // 删除仪器协议转换记录管理
  deleteDeviceProtocolConversionRecord: async (id: number) => {
    return await request.delete({ url: `/base/device-protocol-conversion-record/delete?id=` + id })
  },

  // 导出仪器协议转换记录管理 Excel
  exportDeviceProtocolConversionRecord: async (params) => {
    return await request.download({ url: `/base/device-protocol-conversion-record/export-excel`, params })
  },
}
